<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with #donkey kong - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=%23donkey+kong</link>
      <pubDate>Sun, 08 Aug 2021 20:33:56 +0000</pubDate>
         <description>Tagged with #donkey kong - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/tagged%23donkey+kong/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>How to Generate 2D movement on a game(left right jump) and platforms?</title>
      <link>https://forum.processing.org/two/discussion/22853/how-to-generate-2d-movement-on-a-game-left-right-jump-and-platforms</link>
      <pubDate>Thu, 01 Jun 2017 11:09:41 +0000</pubDate>
      <dc:creator>gbel</dc:creator>
      <guid isPermaLink="false">22853@/two/discussions</guid>
      <description><![CDATA[<p>Hi, I am designing  Donkey Kong style game, I have the menu but I am having no succes on creating the movement and the boundaries/platforms, any ideas?</p>
]]></description>
   </item>
   <item>
      <title>Display decor using tables</title>
      <link>https://forum.processing.org/two/discussion/10963/display-decor-using-tables</link>
      <pubDate>Sat, 23 May 2015 19:18:43 +0000</pubDate>
      <dc:creator>Spacetcha</dc:creator>
      <guid isPermaLink="false">10963@/two/discussions</guid>
      <description><![CDATA[<p>Hello,</p>

<p>I inform you I'm not a programmer and don't know the word and the best practices.</p>

<p>My project is to create a donkey kong video game using Processing, the old version of DK with Mario and ladders, etc..</p>

<p>In order to display the decor and then use those data to interact with Mario, I would like to add those data in a table.</p>

<p>I don't know if I'm clear but I need help for this.
Thank you;</p>

<hr />

<pre><code>int
ecran_w = 1200, 
ecran_h = 675, 
mario_pos_x = 50, 
mario_pos_y = 570;

boolean
engagementSaut = false, 
keyup = false, 
keyright = false, 
keyleft = false, 
keydown = false, 
keyspace = false;

ArrayList 
DecorList = new ArrayList();

PImage
photoVictoire, 
mario_r, 
mario_l, 
DonkeyKong, 
Peach;

Decor decor = new Decor(0, 600, 1200, 25, 255, 165, 0);


void setup() {
  frameRate(150);
  size(ecran_w, ecran_h);
  background(0);

  photoVictoire = loadImage("DK 64 Victory.png");
  mario_r = loadImage("Mario_R.png");
  mario_l = loadImage("Mario_L.png");
  DonkeyKong = loadImage("Donkey Kong.png");
  Peach = loadImage("Peach.png");
}

void draw() {
  background(0);

  image(DonkeyKong, 50, 144);
  image(Peach, 500, 55);

  decor.init();
  decor.display();
}


class Decor {
  int x, y, largeur, hauteur, couleurRed, couleurGreen, couleurBlue;

  Decor(int xpos, int ypos, int l, int h, int cR, int cG, int cB) {
    x = xpos;
    y = ypos;
    largeur = l;
    hauteur = h;
    couleurRed = cR;
    couleurGreen = cG;
    couleurBlue = cB;
  }

  void display() {
    for (int i = 0; i &lt; DecorList.size (); i++) {
      Decor xpos = (Decor) DecorList.get(i); 
      Decor ypos = (Decor) DecorList.get(i);
      Decor l = (Decor) DecorList.get(i);
      Decor h = (Decor) DecorList.get(i);
      Decor cR = (Decor) DecorList.get(i);
      Decor cG = (Decor) DecorList.get(i);
      Decor cB = (Decor) DecorList.get(i);

      fill(couleurRed, couleurGreen, couleurBlue);
      rect(x, y, largeur, hauteur);
    }
  }

  void init() {  
    if (DecorList.size()&lt;8) {
      DecorList.add (new Decor(0, 600, 1200, 25, 255, 165, 0));
      DecorList.add (new Decor(0, 500, 1200, 25, 255, 165, 0));
      DecorList.add (new Decor(0, 400, 200, 25, 255, 165, 0));
      DecorList.add (new Decor(300, 400, 600, 25, 255, 165, 0));
      DecorList.add (new Decor(0, 300, 500, 25, 255, 165, 0));
      DecorList.add (new Decor(700, 300, 500, 25, 255, 165, 0));
      DecorList.add (new Decor(0, 200, 1200, 25, 255, 165, 0));
      DecorList.add (new Decor(500, 100, 200, 25, 255, 165, 0));
    }
  }
}
</code></pre>

<hr />

<p>This is what I have :
<img src="http://forum.processing.org/two/uploads/imageupload/060/CVEX6O3QOYDH.png" alt="DK (1)" title="DK (1)" /></p>

<p>This is what it should look like (the orange ones)
<img src="http://forum.processing.org/two/uploads/imageupload/803/CGM7FVQWZTR2.png" alt="DK (2)" title="DK (2)" /></p>
]]></description>
   </item>
   </channel>
</rss>